package com.indusfo.spc.controller;

import com.indusfo.spc.pojo.FixedDetePro;
import com.indusfo.spc.service.FixedDeteProService;
import com.indusfo.spc.vo.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @author: louk
 * @Description:固定检验项目
 * @date: 2019/11/6 14:38
 *
 */
@Controller
@RequestMapping("/fixedDetePro")
public class FixedDeteProController {

    @Resource
    private FixedDeteProService fixedDeteProService;

    //新增固定检验项目
    @RequestMapping("/insertFixedDetePro")
    @ResponseBody
    public JSONObject insertFixedDetePro(FixedDetePro fixedDetePro){
        return fixedDeteProService.insertFixedDetePro(fixedDetePro);
    }

    //更新固定检验项目
    @RequestMapping("/updateFixedDetePro")
    @ResponseBody
    public JSONObject updateFixedDetePro(FixedDetePro fixedDetePro){
        return fixedDeteProService.updateFixedDetePro(fixedDetePro);
    }

    //查询
    @RequestMapping("/queryFixedDetePro")
    @ResponseBody
    public JSONObject queryFixedDetePro(FixedDetePro fixedDetePro){
        JSONObject jsonObject = fixedDeteProService.queryFixedDetePro(fixedDetePro);
        return jsonObject;
    }

    //启用/停用/删除固定检验项目
    @RequestMapping("/defineFixedDetePro")
    @ResponseBody
    public JSONObject defineFixedDetePro(Integer[] fixedDetePros,Integer dataState){
        return fixedDeteProService.defineFixedDetePro(fixedDetePros,dataState);
    }

}
